import { IsArray, IsUUID } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class AssignRolesDto {
  @ApiProperty({ 
    description: '角色ID列表', 
    type: [String],
    example: ['3fa85f64-5717-4562-b3fc-2c963f66afa6', '3fa85f64-5717-4562-b3fc-2c963f66afa7']
  })
  @IsArray({ message: '角色ID必须是数组' })
  @IsUUID('4', { each: true, message: '无效的角色ID格式' })
  roleIds: string[];
} 